package com.foreknow.demo7;

public class StringDemo2 {
    public static void main(String[] args) {
        String s1 = "haha";
        String s2 = "haha";
        String s3 = new String("haha");
        String s4 = new String("haha");
        String s5 = "ha"+"ha";
        String s6 = new String("ha")+"ha";

        System.out.println(s1==s2);
        System.out.println(s1==s3);
        System.out.println(s1==s5);
        System.out.println(s1==s6);

        System.out.println(s3==s4);
        System.out.println(s3==s5);
        System.out.println(s5==s6);
        System.out.println(s3==s6);


    }
}
